package com.alageek.study.service;

import com.alageek.study.component.MyFallBackFactory;
import com.alageek.study.entity.Employee;
import com.alageek.study.entity.ResultEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "alageek-provider", fallbackFactory = MyFallBackFactory.class)
public interface EmployeeRemoteService {

    @RequestMapping("/provider/get/employee/remote")
    public Employee getEmployeeRemote();

    @RequestMapping("/provider/circuit/breaker/get/emp")
    public ResultEntity<Employee> getEmpRemote(@RequestParam("signal") String signal);

}
